home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ Language=VBScript CODEPAGE=65001 %> <!--#include file="include/wmsConstants.inc"--> <!--#include file="include/wmsLocStrings.inc"--> <!--#include file="include/wmsServerHash.inc"--> <!--#include file="include/wmsconnect.inc"--> <!--#include file="include/wmsCommon.inc"--> <!--#include file="include/wmsHeader.inc"--> <!--#include file="include/wmsError.inc"--> <% '+------------------------------------------------------------------------- ' ' Microsoft Windows Media ' Copyright (C) Microsoft Corporation. All rights reserved. ' ' File: WMSSession.asp ' ' Contents: used in hidden frame to keep session alive ' '-------------------------------------------------------------------------- if( ( FALSE = Session( "Initialized" ) ) or ( 0 < Len( Request.QueryString( "logoff" ) ) ) ) then HandleLogoff end if '//////////////////////////////////////////////////////////////// Sub HandleLogoff() on error resume next Dim objSession Set objSession = Session( "CurSession" ) objSession.Logoff Session.Timeout = 0 Session.Abandon %><html><head></head><body onload="window.parent.location.replace( '/wmslogoff.asp?terminate=1&close=1' );"></body></html><% Response.Flush Response.End End Sub ' Keeps the session alive-- important! Dim strUrl strUrl = "" if( 0 < Len( qs( "server" ) ) ) then strUrl = Request.ServerVariables("url") & "?server=" & qs( "server" ) & "&keepaliveseed=" & Second( Now ) else strUrl = Request.ServerVariables("url") & "?keepaliveseed=" & Second( Now ) end if if( 0 = Len( qs( "heartbeat" ) ) ) then dwHeartbeat = 1 else dwHeartbeat = qs( "heartbeat" ) + 1 if( dwHeartbeat > HEARTBEATS_BETWEEN_OM_PING ) then dwHeartbeat = dwHeartbeat mod HEARTBEATS_BETWEEN_OM_PING end if end if WriteHTMLHeader( "Session KeepAlive" ) %> <meta HTTP-EQUIV="refresh" content="<%= HEARTBEAT_INTERVAL %>;url=<%= strUrl %>&heartbeat=<%= dwHeartbeat %>"/> <script language="JavaScript" src="include/WMSCommon.js"></script> <script language="JavaScript"> <!-- /*@cc_on @*/ <% DisableContextMenu %> window.name="WMSSession"; var g_bLogOffClickHandled = false; var g_bInitialized = false; var g_strLastElement = new String(""); /////////////////////////////////////////////////////////////////////// function InformHostWin() { <% jsTRY %> var win = null; win = window.open( "", "sList", "", true ); if( win ) { var szWinLocation = new String( "" ); /*@if (@_jscript_version >= 1.3) try { @end @*/ if( win.location ) { szWinLocation = win.location.toString(); } /*@if (@_jscript_version >= 1.3) } catch( except ) { } @end @*/ if( ( "about:blank" == szWinLocation ) || ( 0 == szWinLocation.length ) ) { win.close(); } else { win.RecordLocalHostWinName( window.parent.name ); } } else { } <% jsCATCH %> } /////////////////////////////////////////////////////////////////////// function SetWinName() { <% jsTRY %> var win = null; <% Dim strWinName strWinName = g_strQueryStringServer if( 0 >= Len( strWinName ) )then if( Session("ShowServerList") ) then strWinName = "sList" end if end if %> if( window.parent && window.parent.top ) { if( window.parent.top.name != "<%= strWinName %>" ) { win = window.parent.top; } } else { if( window.parent ) { if( window.parent.name != "<%= strWinName %>" ) { win = window.parent; } } else { win = window; } } if( win ) { win.name = "<%= strWinName %>"; } <% jsCATCH %> } SetWinName(); <% ' ' Ensure the session didn't expire. If it did, then refresh the ' server list so that the links will work properly. ' if ( 0 = Len( qs( "server" ) ) ) and ( FALSE = Session( "Initialized" ) ) then %> /////////////////////////////////////////////////////////////////////// function Init() { <% jsTRY %> if( window.parent && window.parent.top ) { window.parent.top.location = "/default.asp"; } else { if( window.parent ) { window.parent.location = "/default.asp"; } } <% jsCATCH %> } Init(); <% end if %> /////////////////////////////////////////////////////////////////////// function HandleKeyUp() { Logoff(); } /////////////////////////////////////////////////////////////////////// function Logoff() { <% jsTRY %> if( g_bLogOffClickHandled ) { return; } if( ! window.confirm( "<% if( TRUE = Session( "ShowServerList" ) ) then Response.Write( RemoveDangerousCharacters( L_LOGOFFSLCONF_TEXT ) ) else Response.Write( RemoveDangerousCharacters( L_LOGOFFCONF_TEXT ) ) end if %>" ) ) { return; } g_bLogOffClickHandled = true; TellSessionFrameToAbandon(); var winServerList = null; var szFeatures = ""; winServerList = window.open( "", "sList", szFeatures, true ); if( winServerList ) { var szwinLoc = new String( winServerList.location ); if( 0 < szwinLoc.length ) { winServerList.location.replace( document.location.protocol + "//" + document.location.hostname + ":" + document.location.port + "/WMSLogOff.asp?terminate=1" ); } } var winHelp = window.open( "", "HELP", szFeatures, true ); window.focus(); if( winHelp ) { winHelp.close(); } window.focus(); window.parent.parent.location.replace( document.location.protocol + "//" + document.location.hostname + ":" + document.location.port + "/WMSLogOff.asp?terminate=1&close=1" ); <% jsCATCH %> } /////////////////////////////////////////////////////////////////////// function TellSessionFrameToAbandon() { <% jsTRY %> document.location.replace( document.location + "&logoff=true" ); <% jsCATCH %> } /////////////////////////////////////////////////////////////////////// function DoMouseHover( bEntering ) { <% jsTRY %> if( bEntering ) { logofftext.style.color = "green"; logofftable.style.background = "#FFFFAA"; } else { logofftext.style.color = "white"; logofftable.style.background = "#6699FF"; } <% jsCATCH %> } /////////////////////////////////////////////////////////////////////// function ShowSecurity() { <% jsTRY %> var win; var szUrl = new String( "/default.asp?lhwn=<%= Session( "LocalHostWinName" ) %>" ); var szFeatures = ""; win = window.open( szUrl, "sList", szFeatures, true ); if( win ) { win.focus(); } <% jsCATCH %> } --> </script> </head> <body <% if ( 0 < Len( Request.QueryString( "InformHostWin" ) ) ) then %>onload="JavaScript:InformHostWin();"<% end if %> bgcolor="#6699FF" oncontextmenu="JavaScript:event.cancelBubble=true;return false;"> <table height="20" width="100%" cellspacing="1" cellpadding="0" bgcolor="#6699FF"> <tr> <td width="100%" align="left" valign="top"> <a href="JavaScript:HandleKeyUp();"> <table tabIndex="0" ID="logofftable" cellspacing="0" cellpadding="0" border="1" style="border-collapse:collapse" bgcolor="#6699FF" bordercolor="#6699FF" onMouseEnter="JavaScript:DoMouseHover( true );" onMouseLeave="JavaScript:DoMouseHover( false );" onClick="JavaScript:Logoff();" > <tr> <td> <table cellspacing="2" cellpadding="0" border="0" ID="Table1" class="logoffbtn"> <tr numcols="2"> <td align="right" width="24" nowrap style="cursor:<% if ( brMSIE <> Session( "BrowserType" ) ) then %>default<% else %>hand<% end if %>"> <span nowrap align="right" valign="absmiddle" style="cursor:<% if ( brMSIE <> Session( "BrowserType" ) ) then %>default<% else %>hand<% end if %>" title="<%= Server.HTMLEncode( L_LOGOFFBTN_TEXT ) %>"> <img height="24" width="24" src="img/WMSLogoff_24.gif" border="0" alt="<%= Server.HTMLEncode( L_LOGOFFALT_TEXT ) %>"> </span> </td> <td align="right" valign="middle" width="*" nowrap> <div ID="logofftext" valign="absmiddle" align="left" style="color:white;FONT-FAMILY:Tahoma,Arial,Helvetica,sans-serif;FONT-WEIGHT:bold;FONT-SIZE=16;cursor:<% if ( brMSIE <> Session( "BrowserType" ) ) then %>default<% else %>hand<% end if %>" title="<%= Server.HTMLEncode( L_LOGOFFALT_TEXT ) %>" nowrap> <%= SpacesToNonbreak( Server.HTMLEncode( L_LOGOFFBTN_TEXT ) ) %> </div> </td> </tr> </table> </td> </tr> </table> </a> </td> <% if( FALSE and FALSE = g_bSecureConnection ) then %> <td height="24" valign="top" align="left"> <table cellspacing="0" cellpadding="0" bgcolor="#6699FF" bordercolor="#6699FF" border="1" style="border-width=0" height="24" width="100%" hspace="0" vspace="0"> <tr valign="middle"> <td> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap align="absmiddle"> <a href="JavaScript:ShowSecurity();"> <img border="0" valign="middle" height="24" width="24" alt="<%= Server.HTMLEncode( L_NONSECUREWARNING_TEXT ) %>" src="img/not_secure_24.gif"> </a> </td> <td> <span class="defaultcursor"> </span> </td> <td nowrap valign="middle"> <span title="<%= Server.HTMLEncode( L_NONSECUREWARNING_TEXT ) %>" onClick="JavaScript:ShowSecurity();" class="warntext" style="cursor:<% if ( brMSIE <> Session( "BrowserType" ) ) then %>default<% else %>hand<% end if %>" id="nonsecure" valign="middle" href="http://<%= Request.ServerVariables( "HTTP_HOST" ) %>/default.asp" target="sList" border="0"> <% if ( brMSIE <> Session( "BrowserType" ) ) then %><a class="warntext" style="cursor:<% if ( brMSIE <> Session( "BrowserType" ) ) then %>default<% else %>hand<% end if %>" href="JavaScript:ShowSecurity();"><font color="#ff0000"><% end if %><%= Server.HTMLEncode( L_NONSECURE_TEXT ) %><% if( brMSIE <> Session( "BrowserType" ) ) then %></font></a><% end if %> </span> </td> </tr> </table> </td> </tr> </table> </td> <% end if %> </tr> </table> <% if( HEARTBEATS_BETWEEN_OM_PING = dwHeartbeat ) then on error resume next if( 0 < Len( g_strDecodedServerName ) ) then ConnectToNamedServer g_strDecodedServerName, "connect", g_objServer end if end if %> </body> </html> <% WMSServerHashASPCleanup WMSConnectASPCleanup %>